package org.chnxi.study.springcloud.dubbo.shiro.auth.controller;


import org.chnxi.study.springcloud.dubbo.shiro.auth.entity.User;
import org.chnxi.study.springcloud.dubbo.shiro.auth.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 
 * @since 2020-08-12
 */
@RestController
@RequestMapping("/auth/user")
public class UserController {

    @Autowired
    IUserService userService;

    @GetMapping("/{userid}")
    public User getUserById(@PathVariable("userid") Integer userId){
        return userService.findUserById(userId);
    }

}
